package com.camartsApp.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.index.Indexed;

import java.util.Date;

@Data
@Document(collection = "posts")
public class Post {
    @Id
    private String id; // 使用 ObjectId 作为主键

    @Indexed
    private String title;
    
    private String content;
    private Date createTime;
    private Date updateTime;
    private Integer imageId;
    private Integer status;
    private Integer likeCount;
    private Integer favoriteCount;
    private Boolean isDelete;
}